package org.example.day20240827;

public class Card {
    private Integer rank;
    private String suits;

    public Card(String suits, Integer rank) {
        this.rank = rank;
        this.suits = suits;
    }

    @Override
    public String toString() {
        String new_rank = " ";
        switch (this.rank) {
            case 1:
                new_rank = "A";
                break;
            case 11:
                new_rank = "J";
                break;
            case 12:
                new_rank = "Q";
                break;
            case 13:
                new_rank = "K";
                break;
            default: new_rank = String.valueOf(this.rank);
                break;
        }
        return this.suits + new_rank;
    }

    public Integer getRank() {
        return rank;
    }

    public void setRank(Integer rank) {
        this.rank = rank;
    }

    public String getSuits() {
        return suits;
    }

    public void setSuits(String suits) {
        this.suits = suits;
    }
}
